//
//  JSCityListCell.m
//  NiubilityProject
//
//  Created by Apple on 2017/11/20.
//  Copyright © 2017年 Apple. All rights reserved.
//

#import "JSCityListCell.h"


@interface JSCityListCell ()

/** */
@property (nonatomic, strong) CALayer *bgLayer;;


@end


@implementation JSCityListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.backgroundColor = [UIColor clearColor];
        _bgLayer = [CALayer layer];
        _bgLayer.backgroundColor = [UIColor whiteColor].CGColor;
        _bgLayer.cornerRadius = 5;
        _bgLayer.masksToBounds= YES;
        [self.contentView.layer insertSublayer:_bgLayer atIndex:0];
        self.contentView.backgroundColor = [UIColor clearColor];
    }
    return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.bgLayer.frame = CGRectMake(10, 5, self.contentView.frame.size.width - 20, self.contentView.frame.size.height - 10);
}

@end
